package com.xinqi.modules.course.clazz.client;

import com.xinqi.common.base.constants.ServiceNameConstants;
import com.xinqi.common.base.response.R;
import com.xinqi.modules.course.clazz.dto.rsp.ClassGroupResultDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * 班级分组表客户端
 *
 * @author: system
 * @date: 2023/10/31
 */
@FeignClient(contextId = "classGroupClient", value = ServiceNameConstants.XQ_COURSE)
public interface ClassGroupClient {
    String INNER_PREFIX = "/inner/class-group";

    /**
     * 班级分组表-详情
     */
    @GetMapping(INNER_PREFIX + "/{id}")
    R<ClassGroupResultDTO> findById(@PathVariable("id") Long id);

    @GetMapping(INNER_PREFIX + "/selectList")
    R<List<ClassGroupResultDTO>> selectList(@RequestParam("groupIds") List<Long> groupIds);

}
